home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / IntlResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  13.6 KB  |  382 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        IntlResources.h
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5+
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1983-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __INTLRESOURCES__
  19. #define __INTLRESOURCES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47.  
  48. enum {
  49.                                                                 /* Bits in the itlcFlags byte */
  50.     itlcShowIcon                = 7,                            /*Show icon even if only one script*/
  51.     itlcDualCaret                = 6,                            /*Use dual caret for mixed direction text*/
  52.                                                                 /* Bits in the itlcSysFlags word */
  53.     itlcSysDirection            = 15                            /*System direction - left to right/right to left*/
  54. };
  55.  
  56.  
  57. enum {
  58.     tokLeftQuote                = 1,                            /* NumberParts.data[] enumerators                                             */
  59.     tokRightQuote                = 2,                            /*  In general, these are NOT to be considered indices into the data[] array */
  60.     tokLeadPlacer                = 3,
  61.     tokLeader                    = 4,
  62.     tokNonLeader                = 5,
  63.     tokZeroLead                    = 6,
  64.     tokPercent                    = 7,
  65.     tokPlusSign                    = 8,
  66.     tokMinusSign                = 9,
  67.     tokThousands                = 10,
  68.     tokReserved                    = 11,                            /* 11 is reserved field */
  69.     tokSeparator                = 12,
  70.     tokEscape                    = 13,
  71.     tokDecPoint                    = 14,
  72.     tokEPlus                    = 15,
  73.     tokEMinus                    = 16,
  74.     tokMaxSymbols                = 31,
  75.     curNumberPartsVersion        = 1                                /*current version of NumberParts record*/
  76. };
  77.  
  78.  
  79. enum {
  80.     currSymLead                    = 16,
  81.     currNegSym                    = 32,
  82.     currTrailingZ                = 64,
  83.     currLeadingZ                = 128
  84. };
  85.  
  86.  
  87. enum {
  88.     mdy                            = 0,
  89.     dmy                            = 1,
  90.     ymd                            = 2,
  91.     myd                            = 3,
  92.     dym                            = 4,
  93.     ydm                            = 5
  94. };
  95.  
  96. typedef SInt8                             DateOrders;
  97.  
  98. enum {
  99.     timeCycle24                    = 0,                            /*time sequence 0:00 - 23:59*/
  100.     timeCycleZero                = 1,                            /*time sequence 0:00-11:59, 0:00 - 11:59*/
  101.     timeCycle12                    = 255,                            /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
  102.     zeroCycle                    = 1,                            /*old name for timeCycleZero*/
  103.     longDay                        = 0,                            /*day of the month*/
  104.     longWeek                    = 1,                            /*day of the week*/
  105.     longMonth                    = 2,                            /*month of the year*/
  106.     longYear                    = 3,                            /*year*/
  107.     supDay                        = 1,                            /*suppress day of month*/
  108.     supWeek                        = 2,                            /*suppress day of week*/
  109.     supMonth                    = 4,                            /*suppress month*/
  110.     supYear                        = 8,                            /*suppress year*/
  111.     dayLdingZ                    = 32,
  112.     mntLdingZ                    = 64,
  113.     century                        = 128,
  114.     secLeadingZ                    = 32,
  115.     minLeadingZ                    = 64,
  116.     hrLeadingZ                    = 128
  117. };
  118.  
  119. /* move OffsetTable to QuickdrawText */
  120.  
  121. struct Intl0Rec {
  122.     char                             decimalPt;                    /*decimal point character*/
  123.     char                             thousSep;                    /*thousands separator character*/
  124.     char                             listSep;                    /*list separator character*/
  125.     char                             currSym1;                    /*currency symbol*/
  126.     char                             currSym2;
  127.     char                             currSym3;
  128.     UInt8                             currFmt;                    /*currency format flags*/
  129.     UInt8                             dateOrder;                    /*order of short date elements: mdy, dmy, etc.*/
  130.     UInt8                             shrtDateFmt;                /*format flags for each short date element*/
  131.     char                             dateSep;                    /*date separator character*/
  132.     UInt8                             timeCycle;                    /*specifies time cycle: 0..23, 1..12, or 0..11*/
  133.     UInt8                             timeFmt;                    /*format flags for each time element*/
  134.     char                             mornStr[4];                    /*trailing string for AM if 12-hour cycle*/
  135.     char                             eveStr[4];                    /*trailing string for PM if 12-hour cycle*/
  136.     char                             timeSep;                    /*time separator character*/
  137.     char                             time1Suff;                    /*trailing string for AM if 24-hour cycle*/
  138.     char                             time2Suff;
  139.     char                             time3Suff;
  140.     char                             time4Suff;
  141.     char                             time5Suff;                    /*trailing string for PM if 24-hour cycle*/
  142.     char                             time6Suff;
  143.     char                             time7Suff;
  144.     char                             time8Suff;
  145.     UInt8                             metricSys;                    /*255 if metric, 0 if inches etc.*/
  146.     short                             intl0Vers;                    /*region code (hi byte) and version (lo byte)*/
  147. };
  148. typedef struct Intl0Rec                    Intl0Rec;
  149.  
  150. typedef Intl0Rec *                        Intl0Ptr;
  151. typedef Intl0Ptr *                        Intl0Hndl;
  152.  
  153. struct Intl1Rec {
  154.     Str15                             days[7];                    /*day names*/
  155.     Str15                             months[12];                    /*month names*/
  156.     UInt8                             suppressDay;                /*255 for no day, or flags to suppress any element*/
  157.     UInt8                             lngDateFmt;                    /*order of long date elements*/
  158.     UInt8                             dayLeading0;                /*255 for leading 0 in day number*/
  159.     UInt8                             abbrLen;                    /*length for abbreviating names*/
  160.     char                             st0[4];                        /*separator strings for long date format*/
  161.     char                             st1[4];
  162.     char                             st2[4];
  163.     char                             st3[4];
  164.     char                             st4[4];
  165.     short                             intl1Vers;                    /*region code (hi byte) and version (lo byte)*/
  166.     short                             localRtn[1];                /*now a flag for opt extension*/
  167. };
  168. typedef struct Intl1Rec                    Intl1Rec;
  169.  
  170. typedef Intl1Rec *                        Intl1Ptr;
  171. typedef Intl1Ptr *                        Intl1Hndl;
  172. /*fields for optional itl1 extension*/
  173.  
  174. struct Itl1ExtRec {
  175.     Intl1Rec                         base;                        /*un-extended Intl1Rec*/
  176.     short                             version;
  177.     short                             format;
  178.     short                             calendarCode;                /*calendar code for this itl1 resource*/
  179.     long                             extraDaysTableOffset;        /*offset in itl1 to extra days table*/
  180.     long                             extraDaysTableLength;        /*length of extra days table*/
  181.     long                             extraMonthsTableOffset;        /*offset in itl1 to extra months table*/
  182.     long                             extraMonthsTableLength;        /*length of extra months table*/
  183.     long                             abbrevDaysTableOffset;        /*offset in itl1 to abbrev days table*/
  184.     long                             abbrevDaysTableLength;        /*length of abbrev days table*/
  185.     long                             abbrevMonthsTableOffset;    /*offset in itl1 to abbrev months table*/
  186.     long                             abbrevMonthsTableLength;    /*length of abbrev months table*/
  187.     long                             extraSepsTableOffset;        /*offset in itl1 to extra seps table*/
  188.     long                             extraSepsTableLength;        /*length of extra seps table*/
  189.     short                             tables[1];                    /*now a flag for opt extension*/
  190. };
  191. typedef struct Itl1ExtRec                Itl1ExtRec;
  192.  
  193. struct UntokenTable {
  194.     short                             len;
  195.     short                             lastToken;
  196.     short                             index[256];                    /*index table; last = lastToken*/
  197. };
  198. typedef struct UntokenTable                UntokenTable;
  199. typedef UntokenTable *                    UntokenTablePtr;
  200. typedef UntokenTablePtr *                UntokenTableHandle;
  201.  
  202. union WideChar {
  203.     char                             a[2];                        /*0 is the high order character*/
  204.     short                             b;
  205. };
  206. typedef union WideChar                    WideChar;
  207.  
  208. struct WideCharArr {
  209.     short                             size;
  210.     WideChar                         data[10];
  211. };
  212. typedef struct WideCharArr                WideCharArr;
  213.  
  214. struct NumberParts {
  215.     short                             version;
  216.     WideChar                         data[31];                    /*index by [tokLeftQuote..tokMaxSymbols]*/
  217.     WideCharArr                     pePlus;
  218.     WideCharArr                     peMinus;
  219.     WideCharArr                     peMinusPlus;
  220.     WideCharArr                     altNumTable;
  221.     char                             reserved[20];
  222. };
  223. typedef struct NumberParts                NumberParts;
  224. typedef NumberParts *                    NumberPartsPtr;
  225.  
  226.  
  227. struct Itl4Rec {
  228.     short                             flags;                        /*reserved*/
  229.     long                             resourceType;                /*contains 'itl4'*/
  230.     short                             resourceNum;                /*resource ID*/
  231.     short                             version;                    /*version number*/
  232.     long                             resHeader1;                    /*reserved*/
  233.     long                             resHeader2;                    /*reserved*/
  234.     short                             numTables;                    /*number of tables, one-based*/
  235.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  236.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  237.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  238.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  239.     long                             defPartsOffset;                /*offset to default number parts table*/
  240.     long                             resOffset6;                    /*reserved*/
  241.     long                             resOffset7;                    /*reserved*/
  242.     long                             resOffset8;                    /*reserved*/
  243. };
  244. typedef struct Itl4Rec                    Itl4Rec;
  245.  
  246. typedef Itl4Rec *                        Itl4Ptr;
  247. typedef Itl4Ptr *                        Itl4Handle;
  248. /* New NItl4Rec for System 7.0: */
  249.  
  250. struct NItl4Rec {
  251.     short                             flags;                        /*reserved*/
  252.     long                             resourceType;                /*contains 'itl4'*/
  253.     short                             resourceNum;                /*resource ID*/
  254.     short                             version;                    /*version number*/
  255.     short                             format;                        /*format code*/
  256.     short                             resHeader;                    /*reserved*/
  257.     long                             resHeader2;                    /*reserved*/
  258.     short                             numTables;                    /*number of tables, one-based*/
  259.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  260.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  261.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  262.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  263.     long                             defPartsOffset;                /*offset to default number parts table*/
  264.     long                             whtSpListOffset;            /*offset to white space code list*/
  265.     long                             resOffset7;                    /*reserved*/
  266.     long                             resOffset8;                    /*reserved*/
  267.     short                             resLength1;                    /*reserved*/
  268.     short                             resLength2;                    /*reserved*/
  269.     short                             resLength3;                    /*reserved*/
  270.     short                             unTokenLength;                /*length of untoken table*/
  271.     short                             defPartsLength;                /*length of default number parts table*/
  272.     short                             whtSpListLength;            /*length of white space code list*/
  273.     short                             resLength7;                    /*reserved*/
  274.     short                             resLength8;                    /*reserved*/
  275. };
  276. typedef struct NItl4Rec                    NItl4Rec;
  277.  
  278. typedef NItl4Rec *                        NItl4Ptr;
  279. typedef NItl4Ptr *                        NItl4Handle;
  280.  
  281.  
  282. struct TableDirectoryRecord {
  283.     OSType                             tableSignature;                /*4 byte long table name */
  284.     unsigned long                     reserved;                    /*Reserved for internal use */
  285.     unsigned long                     tableStartOffset;            /*Table start offset in byte*/
  286.     unsigned long                     tableSize;                    /*Table size in byte*/
  287. };
  288. typedef struct TableDirectoryRecord        TableDirectoryRecord;
  289.  
  290. struct Itl5Record {
  291.     Fixed                             versionNumber;                /*itl5 resource version number */
  292.     unsigned short                     numberOfTables;                /*Number of tables it contains */
  293.     unsigned short                     reserved[3];                /*Reserved for internal use */
  294.     TableDirectoryRecord             tableDirectory[1];            /*Table directory records */
  295. };
  296. typedef struct Itl5Record                Itl5Record;
  297.  
  298. struct RuleBasedTrslRecord {
  299.     short                             sourceType;                    /*Transliterate target type for the LHS of the rule */
  300.     short                             targetType;                    /*Transliterate target type for the RHS of the rule */
  301.     short                             formatNumber;                /*Transliterate resource format number */
  302.     short                             propertyFlag;                /*Transliterate property flags */
  303.     short                             numberOfRules;                /*Number of rules following this field */
  304. };
  305. typedef struct RuleBasedTrslRecord        RuleBasedTrslRecord;
  306.  
  307.  
  308. struct ItlcRecord {
  309.     short                             itlcSystem;                    /*default system script*/
  310.     short                             itlcReserved;                /*reserved*/
  311.     SInt8                             itlcFontForce;                /*default font force flag*/
  312.     SInt8                             itlcIntlForce;                /*default intl force flag*/
  313.     SInt8                             itlcOldKybd;                /*MacPlus intl keybd flag*/
  314.     SInt8                             itlcFlags;                    /*general flags*/
  315.     short                             itlcIconOffset;                /*keyboard icon offset; not used in 7.0*/
  316.     SInt8                             itlcIconSide;                /*keyboard icon side; not used in 7.0*/
  317.     SInt8                             itlcIconRsvd;                /*rsvd for other icon info*/
  318.     short                             itlcRegionCode;                /*preferred verXxx code*/
  319.     short                             itlcSysFlags;                /*flags for setting system globals*/
  320.     SInt8                             itlcReserved4[32];            /*for future use*/
  321. };
  322. typedef struct ItlcRecord                ItlcRecord;
  323.  
  324. struct ItlbRecord {
  325.     short                             itlbNumber;                    /*itl0 id number*/
  326.     short                             itlbDate;                    /*itl1 id number*/
  327.     short                             itlbSort;                    /*itl2 id number*/
  328.     short                             itlbFlags;                    /*Script flags*/
  329.     short                             itlbToken;                    /*itl4 id number*/
  330.     short                             itlbEncoding;                /*itl5 ID # (optional; char encoding)*/
  331.     short                             itlbLang;                    /*current language for script */
  332.     SInt8                             itlbNumRep;                    /*number representation code*/
  333.     SInt8                             itlbDateRep;                /*date representation code */
  334.     short                             itlbKeys;                    /*KCHR id number*/
  335.     short                             itlbIcon;                    /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  336. };
  337. typedef struct ItlbRecord                ItlbRecord;
  338. /* New ItlbExtRecord structure for System 7.0 */
  339.  
  340. struct ItlbExtRecord {
  341.     ItlbRecord                         base;                        /*un-extended ItlbRecord*/
  342.     long                             itlbLocalSize;                /*size of script's local record*/
  343.     short                             itlbMonoFond;                /*default monospace FOND ID*/
  344.     short                             itlbMonoSize;                /*default monospace font size*/
  345.     short                             itlbPrefFond;                /*preferred FOND ID*/
  346.     short                             itlbPrefSize;                /*preferred font size*/
  347.     short                             itlbSmallFond;                /*default small FOND ID*/
  348.     short                             itlbSmallSize;                /*default small font size*/
  349.     short                             itlbSysFond;                /*default system FOND ID*/
  350.     short                             itlbSysSize;                /*default system font size*/
  351.     short                             itlbAppFond;                /*default application FOND ID*/
  352.     short                             itlbAppSize;                /*default application font size*/
  353.     short                             itlbHelpFond;                /*default Help Mgr FOND ID*/
  354.     short                             itlbHelpSize;                /*default Help Mgr font size*/
  355.     Style                             itlbValidStyles;            /*set of valid styles for script*/
  356.     Style                             itlbAliasStyle;                /*style (set) to mark aliases*/
  357. };
  358. typedef struct ItlbExtRecord            ItlbExtRecord;
  359.  
  360.  
  361.  
  362. #if PRAGMA_STRUCT_ALIGN
  363.     #pragma options align=reset
  364. #elif PRAGMA_STRUCT_PACKPUSH
  365.     #pragma pack(pop)
  366. #elif PRAGMA_STRUCT_PACK
  367.     #pragma pack()
  368. #endif
  369.  
  370. #ifdef PRAGMA_IMPORT_OFF
  371. #pragma import off
  372. #elif PRAGMA_IMPORT
  373. #pragma import reset
  374. #endif
  375.  
  376. #ifdef __cplusplus
  377. }
  378. #endif
  379.  
  380. #endif /* __INTLRESOURCES__ */
  381.  
  382.